package com.yunhan.scc.article.utils.execlutil;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
 * Execl用户实体 和Execl数据 是对应的，这里做参考。
 * 需要实现 {@link ExeclBeanInterface}
 * @Author YangTao
 * @Date 2016年1月30日 下午6:01:40 
 * @Version
 * @Since
 */
public class Persion implements ExeclBeanInterface{
	
	public static HashMap<String, String> hashMap = new HashMap<>();
	
	private int id;
	private String displayname;
	private String name;
	private Date date;
	private int hight;
	private double mony;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public int getHight() {
		return hight;
	}
	public void setHight(int hight) {
		this.hight = hight;
	}
	public double getMony() {
		return mony;
	}
	public void setMony(double mony) {
		this.mony = mony;
	}
	public static HashMap<String, String> getHashMap() {
		return hashMap;
	}
	public static void setHashMap(HashMap<String, String> hashMap) {
		Persion.hashMap = hashMap;
	}

	public String getDisplayname() {
		return displayname;
	}
	public void setDisplayname(String displayname) {
		this.displayname = displayname;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	

	static {
		hashMap.put("姓名", "name");
		hashMap.put("编号", "id");
		hashMap.put("用户名", "displayname");
		hashMap.put("生日", "date");
		hashMap.put("身高", "hight");
		hashMap.put("工资", "mony");
	}

	@Override
	public String getPerties(String key) {
		return hashMap.get(key);
	}
	
	@Override
	public String toString() {
		
		return this.getId() + this.getName() + getDisplayname() + getDate() + getHight() + getMony();
	}
	@Override
	public Map<String,String> getTileMap() {
		return 	hashMap;
	}
	@Override
	public boolean hasError() {
		return false;
	}
	
}
